<!-- 子组件 -->
<template>
    <div>
        <button @click="increment">{{num}}</button>
    </div>
</template>

<script>
export default {
    props: ['num'],
    methods: {
        increment() {
            this.$emit('update:count', this.num + 2)
        }
    },

}
</script>